var LoadingScene = cc.Scene.extend({
	onEnter:function(){
		this._super();
		var layer = new LoadingLayer();
		layer.setColor(cc.color(0, 0, 0, 255));
		this.addChild(layer);
		LoadData();
		setTimeout(function () {
			cc.director.runScene(new cc.TransitionCrossFade(2,new MainMenuScene()))
		}.bind(this),2000);
	}
});

var LoadingLayer = cc.Layer.extend({

	_sptBg     : null,
	_sptLogo   : null,

	ctor : function(){
		
		this._super()

		this.initBackground();

	},

	initBackground : function(){
		this._sptBg = new cc.Sprite("res/silverblade.jpg");

		this._sptBg.attr({
			anchorX : 0.5,
			anchorY : 0.5,
			x: 320,
			y: 480
		});

		this.addChild(this._sptBg);
	}
});